package com.bignerdranch.android.furnitureapplication.net;

import com.bignerdranch.android.furnitureapplication.entity.BrandInfoBean;
import com.bignerdranch.android.furnitureapplication.entity.FurnitureInfoBean;
import com.bignerdranch.android.furnitureapplication.entity.NewsInfoBean;
import com.bignerdranch.android.furnitureapplication.entity.RedWoodInfoBean;

import java.util.List;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

public interface NewsService {
    @POST("/SSMDemo/getKnowInfo")
    Observable<List<NewsInfoBean>> getNewsInfo();

    @POST("/SSMDemo/getRedWoodInfo")
    Observable<List<RedWoodInfoBean>> getRedKnowInfo();

    @POST("/SSMDemo/getBrandInfo")
    Observable<List<BrandInfoBean>> getBrandInfo();

    @POST("/SSMDemo/getFurniture")
    Observable<List<FurnitureInfoBean>> getFurnitureInfo();

    @POST("/SSMDemo/isInCollection")
    @FormUrlEncoded
    Observable<LoginResponse> isInCollection(@Field("user_account") String userAccount, @Field("furniture_id") int furnitureId);

    @POST("/SSMDemo/addFurnitureCollectionInfo")
    @FormUrlEncoded
    Observable<LoginResponse> addFurnitureCollectionInfo(@Field("user_account") String userAccount, @Field("furniture_id") int furnitureId);

    @POST("/SSMDemo/cancelFurnitureCollectionInfo")
    @FormUrlEncoded
    Observable<LoginResponse> cancelFurnitureCollectionInfo(@Field("user_account") String userAccount, @Field("furniture_id") int furnitureId);

    @POST("/SSMDemo/getFurnitureCollectionInfo")
    @FormUrlEncoded
    Observable<List<FurnitureInfoBean>> getFurnitureCollectionInfo(@Field("user_account") String userAccount);

    @POST("/SSMDemo/addOrderInfo")
    @FormUrlEncoded
    Observable<LoginResponse> addOrderInfo(@Field("user_account") String userAccount, @Field("furniture_id") int furnitureId, @Field("order_date") String getDate, @Field("order_price") double orderPrice);
}
